<?php echo link_to_function(image_tag('/sfFormGuiPlugin/images/puce-plus'), visual_effect('toggle_blind','order-sfFormGuiQuestion-'.$sf_form_gui->getPrimaryKey(),array('duration'=>'.2')));?>
<ul class="sorter" id="order-sfFormGuiQuestion-<?php echo $sf_form_gui->getPrimaryKey(); ?>">
    <?php foreach($sf_form_gui->getSfFormGuiQuestions($criteria) as $sf_form_gui_question): ?>
    <li id="item_<?php echo $sf_form_gui_question->getPrimaryKey() ?>" class="sortable">
        <?php echo image_tag('/sfFormGuiPlugin/images/handle','class=move'); ?>
        <span class="actions">
            <?php echo link_to( image_tag('/sfFormGuiPlugin/images/edit','alt=edit class=action'),'sfFormGuiQuestion/edit?id='.$sf_form_gui_question->getId(),'class=link');?>
            <?php echo link_to( image_tag('/sfFormGuiPlugin/images/delete','alt=delete class=action'),'sfFormGuiQuestion/delete?id='.$sf_form_gui_question->getId(),array(
                'confirm' => __('Are you sure ?'),
                'class' => 'link'
            ));?>
        </span>
        <span>
            <?php echo $sf_form_gui_question->getName() ?>
        </span>
        <div class="clear-both"></div>
    </li>
    <?php endforeach; ?>
</ul>
<?php echo sortable_element('order-sfFormGuiQuestion-'.$sf_form_gui->getPrimaryKey(), array(
          'url'      => 'sfFormGuiQuestion/sort?id='.$sf_form_gui->getPrimaryKey(),
          'update'   => 'feedback',
          'loading'  => visual_effect('appear', 'indicator', array()),
          'complete' => visual_effect('fade', 'indicator', array()),
          'success'  => visual_effect('highlight', 'feedback', array(
              'afterFinish' => 'function() {'.
                  visual_effect('DropOut', 'feedback', array('afterFinish'=>' function() { $("feedback").update().show(); }')).
              '}'
          )),
          'handle' => 'move',
          'only' => 'sortable'
)) ?>
